/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.modulars.business.equipment.service.impl;


import org.opsli.api.wrapper.business.fileManage.FileManageModel;
import org.opsli.core.base.service.impl.CrudServiceImpl;
import org.opsli.modulars.business.equipment.entity.*;
import org.opsli.modulars.business.equipment.mapper.ScheduleLogMapper;
import org.opsli.modulars.business.equipment.service.IEquipmentService;
import org.opsli.modulars.business.fileManage.entity.FileManage;
import org.opsli.modulars.business.fileManage.mapper.FileManageMapper;
import org.opsli.modulars.business.fileManage.service.IFileManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 设备监控 Service Impl
 *
 * @author zk
 * @date 2021-09-14 15:53:53
 */
@Service
public class EquipmentServiceImpl extends CrudServiceImpl<FileManageMapper, FileManage, FileManageModel>
    implements IEquipmentService {

    @Autowired(required = false)
    private ScheduleLogMapper logMapper;

    @Override
    public int  insertScheduleLog(ScheduleLog scheduleLog){
        return logMapper.insertScheduleLog(scheduleLog);
    }


    @Override
    public int  insertUpgradeLog(UpgradeLog scheduleLog){
        return logMapper.insertUpgradeLog(scheduleLog);
    }

    @Override
    public Cmd485Send selectCmd485(String deviceId){
        return logMapper.selectCmd485(deviceId);
    }

    @Override
    public CmdValveConfigSend selectCmdValve(String deviceId){
        return logMapper.selectCmdValve(deviceId);
    }

    @Override
    public int  updateCmd485(Cmd485Send cmd485Send){
        return logMapper.updateCmd485(cmd485Send);
    }

    @Override
    public int  updateCmdValve(CmdValveConfigSend cmdValveConfigSend){
        return logMapper.updateCmdValve(cmdValveConfigSend);
    }

    @Override
    public GatewayMonitorData getGatewayMonitorData(String deviceId){
        return logMapper.getGatewayMonitorData(deviceId);
    }

    @Override
    public ValveMonitorData getValveMonitorData(String deviceId){
        return logMapper.getValveMonitorData(deviceId);
    }

    @Override
    public int insertGatewayMonitorData(GatewayMonitorData data){
        return logMapper.insertGatewayMonitorData(data);
    }

    @Override
    public int insertValveMonitorData(ValveMonitorData data){
        return logMapper.insertValveMonitorData(data);
    }

    @Override
    public int updateGatewayMonitorData(GatewayMonitorData data){
        return logMapper.updateGatewayMonitorData(data);
    }

    @Override
    public int updateValveMonitorData(ValveMonitorData data){
        return logMapper.updateValveMonitorData(data);
    }

    @Override
    public int insertGatewayMonitorDataNow(GatewayMonitorDataNow data){
        return logMapper.insertGatewayMonitorDataNow(data);
    }

    @Override
    public int insertValveMonitorDataNow(ValveMonitorDataNow data){
        return logMapper.insertValveMonitorDataNow(data);
    }

    @Override
    public int updateGatewayMonitorDataNow(GatewayMonitorDataNow data){
        return logMapper.updateGatewayMonitorDataNow(data);
    }

    @Override
    public int updateValveMonitorDataNow(ValveMonitorDataNow data){
        return logMapper.updateValveMonitorDataNow(data);
    }

    @Override
    public GatewayMonitorDataNow getGatewayMonitorDataNow(String deviceId){
        return logMapper.getGatewayMonitorDataNow(deviceId);
    }

    @Override
    public ValveMonitorDataNow getValveMonitorDataNow(String deviceId){
        return logMapper.getValveMonitorDataNow(deviceId);
    }

}
